package com.gupao.study;

import com.gupao.study.autoconfiguration.HelloProperties;
import com.gupao.study.formater.FormateProcessor;

/**
 * @author wangenji
 * @Date 2019-07-07 14:16
 */
public class HelloFormatTemplate {


    private FormateProcessor formateProcessor;
    private HelloProperties helloProperties;

    public HelloFormatTemplate(FormateProcessor formateProcessor, HelloProperties helloProperties) {
        this.formateProcessor = formateProcessor;
        this.helloProperties = helloProperties;
    }

    public <T> String doFormat(T obj){
        return formateProcessor.format(obj)+" properties: "+formateProcessor.format(helloProperties);
    }
}
